<template>
  <router-view></router-view>
</template>
<script>
export default {
  name: 'App',
  data(){
    return{

    }
  },
  components: {

  },
  mounted() {
      let location = window.location;
      if(location.pathname !== "/"){
          this.$store.dispatch('getMenus').then((res)=>{
              this.$store.dispatch('setRouter').then(()=>{
                  this.$router.push({path: location.pathname, query: {...this.$route.query}});
              })
          }).catch(()=>{
              this.$router.push("/")
          });
      };
      this.$store.dispatch('socketConnection').then(()=>{
        
      })
  },
  methods: {
  }
}
</script>

<style>
body,html{
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;

}
#app{
  width: 100%;
  height: 100%;
}
.loading-fixed {
  top: 0px;
  position: fixed;
  width: 100%;
  background: rgba(0, 0, 0, 0.1);
  z-index: 9999;
  height: 100%;
}

.loading {
  width: 100px;
  height: 100px;
  position: relative;
  margin: 0 auto;
  top: 20%;
  z-index: 9999;
}
.main{
  width: 100%;
  height: 100%;
}
.canvas-panel{
  flex: 0 0 auto;
  float: left;
  width: 70%;
  height: 90%;
  background-color: #fff;
//margin-left: 10%;
  border-bottom: 1px solid #e9e9e9;
}

</style>
